<%@page import="com.utility.MobileDAO"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My Mobile Shop</title>
</head>
<body>

	<%!MobileDAO mobileDAO = new MobileDAO();
	int deletedRows;
	int id;%>

	<%
		try {
			id = Integer.parseInt(request.getParameter("id").trim());
		} catch (Exception ex) {
			out.print("<font size='4' color='red' >Wrong ID</font>");
		}

		deletedRows = mobileDAO.delete(id);

		if (deletedRows > 0)
			out.print("<font size='4' color='green' > Mobile Deleted Successfully </font>");
		else
			out.print("<font size='4' color='red' > Mobile ID not Found in Database </font>");
	%>
	<br />
	<a href="javascript:history.back()"> Back </a>

</body>
</html>